/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author JAVIER
 */
@Entity
@Table(name = "bdagrupados.formaspago")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Formaspago.findAll", query = "SELECT f FROM Formaspago f"),
    @NamedQuery(name = "Formaspago.findByIdformapago", query = "SELECT f FROM Formaspago f WHERE f.idformapago = :idformapago"),
    @NamedQuery(name = "Formaspago.findByNombre", query = "SELECT f FROM Formaspago f WHERE f.nombre = :nombre"),
    @NamedQuery(name = "Formaspago.findByImagen", query = "SELECT f FROM Formaspago f WHERE f.imagen = :imagen")})
public class Formaspago implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idformapago")
    private Integer idformapago;
    @Size(max = 45)
    @Column(name = "nombre")
    private String nombre;
    @Size(max = 45)
    @Column(name = "imagen")
    private String imagen;

    public Formaspago() {
    }

    public Formaspago(Integer idformapago) {
        this.idformapago = idformapago;
    }

    public Integer getIdformapago() {
        return idformapago;
    }

    public void setIdformapago(Integer idformapago) {
        this.idformapago = idformapago;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getImagen() {
        return imagen;
    }

    public void setImagen(String imagen) {
        this.imagen = imagen;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idformapago != null ? idformapago.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Formaspago)) {
            return false;
        }
        Formaspago other = (Formaspago) object;
        if ((this.idformapago == null && other.idformapago != null) || (this.idformapago != null && !this.idformapago.equals(other.idformapago))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.entidades.Formaspago[ idformapago=" + idformapago + " ]";
    }
    
}
